import {post, put, getUserId} from './request.js'

export const getOrderList = async (data) => {
	// uni.showLoading();
	const res = await post('express/order/list', data);
	// uni.hideLoading();
	return res.data;
}

export const addBooks = async (data) => {
	var userId =  getUserId();
	if (userId != null && userId != '') {
		data.userId = userId;
		const res = post('express/books/add', data);
		return res.data;
	}
	return false;
}

export const modifyBooks = async (data) => {
	const res = post('express/books/modify', data);
	return res.data;
}

export const getBooksList = async (data) => {
	const res = await post('express/books/list', data);
	return res.data;
}

export const getBooks = async (data) => {
	
	const res = post('express/books/get', data);
	return res.data;
}